#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>
int main()
{
	char c[100], ch;
	int fast = 1;
	int slow = 0;
	scanf("%c", &ch);
	getchar();
	gets(c);
	while (c[fast] != '\0')
	{
		if (c[fast] != '\0' && c[fast] == ch)
		{
			fast++;
		}
		else if (c[fast] != '\0' && c[fast] != ch)
		{
			c[++slow] = c[fast++];
		}

	}
	c[++slow] = '\0';
	puts(c);
	return 0;
}